package com.design.pattern.mediator;

public class GreaseBoss extends Boss{
    public GreaseBoss(String shopName, String goods) {
        super(shopName, goods);
    }

    @Override
    public String shell(Money money) {
        System.out.println(getShopName()+"出售了"+money.getNumber()+(money instanceof Silver?"银子":"交子")+"的"+getGoods());
        return "价值"+money.getNumber()+(money instanceof Silver?"银子":"交子")+"的"+getGoods();
    }

    @Override
    public String buy(Money money, Intermediary intermediary) {
        setIntermediary(intermediary);
        System.out.println(getShopName()+"获得了"+intermediary.buyMeat(money));
        System.out.println(getShopName()+"获得了"+intermediary.buyMeter(money));
        System.out.println(getShopName()+"获得了"+intermediary.buyDish(money));
        return null;
    }
}
